home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / misc / volume15 / dmake-3.6 / part00 next >
Encoding:
Text File  |  1990-10-14  |  13.5 KB  |  312 lines

  1. Newsgroups: comp.sources.misc
  2. X-UNIX-From: dvadura@watdragon.waterloo.edu
  3. subject: v15i052: dmake version 3.6 (part 00/25)
  4. from: Dennis Vadura <dvadura@watdragon.waterloo.edu>
  5. Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  6.  
  7. Posting-number: Volume 15, Issue 52
  8. Submitted-by: Dennis Vadura <dvadura@watdragon.waterloo.edu>
  9. Archive-name: dmake-3.6/part00
  10.  
  11. #!/bin/sh
  12. # This is the DMAKE version 3.6 distribution.  DMAKE is a Make like tool that
  13. # has been written by me and has been used by individuals at the University of
  14. # Waterloo for about a year and a half now.  This release replaces the previous
  15. # version 3.5 release which is no longer supported.  Please read the file
  16. # 'readme/release' which accompanies this distribution and describes details
  17. # of this release (This note is found in readme/cover).
  18. #
  19. # This release addresses a claim made by Mortice Kern Systems of Waterloo,
  20. # Ontario, Canada.  See below or the file readme/release for details.  I
  21. # therefore ask that all versions previous versions of dmake distributed as
  22. # version 3.5 patch level 1 and patch level 2 be removed from any archive
  23. # sites on which they reside and be replaced by this release.
  24. # dmake is available for anonymous ftp from watmsg.uwaterloo.ca address is
  25. # 129.97.129.9.  It is in the pub/src directory, set your mode to binary,
  26. # and copy either:
  27. #     dmake-3.6.tar.Z        - compressed tar format
  28. #     dmake-3.6.zoo        - zoo archive
  29. # dmake is different from other versions of make in that it supports significant
  30. # enhancements (See the man page).  A short summary of the more important
  31. # ones follows:
  32. #     . support for portable makefiles
  33. #     . runs on many platforms (DOS, generic unix [sysv and bsd4.3],
  34. #       apollo, and others)
  35. #     . significantly enhanced macro facilities
  36. #     . transitive closure on inference graph
  37. #     . sophisticated inference algorithm
  38. #     . support for traversing the file sytem both during making of targets
  39. #       and during inference
  40. #     . %-meta rules for specifying rules to be used for inferring
  41. #       prerequisites
  42. #     . highly configurable
  43. #     . support for libraries
  44. #     . parallel making of targets on architectures that support it
  45. #     . attributed targets
  46. #     . text diversions
  47. #     . group recipes
  48. #     . swapping itself to DISK under MSDOS
  49. #     . supports MKS extended argument passing convention
  50. # All code found in this distribution is original and written by me except where
  51. # noted in the source and the following:
  52. # - dbug package from Fred Fish  (dmake DEBUG=1, to make a debugging version
  53. #   of dmake)
  54. # - malloc.c package, came from the net originally, author name wasn't
  55. #   on it when I found it, I can't even remember where I got it.
  56. # -----------------------------------------------------------------------------
  57. # DMAKE VERSION 3.6 RELEASE NOTES  (readme/release file in distribution):
  58. # MANDATORY REPLACEMENT FOR VERSION 3.5 PATCH LEVEL 1 and PATCH LEVEL 2
  59. # Nature:   This version of dmake MUST replace all versions of dmake 3.5 patch
  60. # -------   levels 1 and 2, and all versions of dmake 3.5 patch level 1 and 2
  61. #           must then be DELETED.  This release addresses several issues.
  62. #         1. Copyright infringement claim made by MKS, of Waterloo.
  63. #         2. Modifications to text diversion processing.
  64. #         3. Support for DOS Swapping, and MKS argument passing.
  65. #         4. Other minor nits and tweaks.
  66. #       This distribution advances dmake to Version 3.6, patch level 1.  This
  67. #       version is certified free of MKS copyrighted code.  See below for
  68. #       details.
  69. #           
  70. # Availability:
  71. # -------------
  72. #       dmake is available via anonymous ftp from watmsg.uwaterloo.edu
  73. #       (129.97.129.9) as:
  74. #          pub/src/dmake-3.6.tar.Z
  75. #          pub/src/dmake-3.6.zoo 
  76. #       and comes in either a compressed tar or zoo archive take your pick.
  77. # Acknowledgements:
  78. # -----------------
  79. #       Thanks to all who submitted code for new features, suggestions for
  80. #       improvements, and bug fixes.  Special thanks to those who helped
  81. #       test this version of dmake on the many platforms that the
  82. #       distribution now supports.  I have tried to make sure no gotchas
  83. #       remain, if you encounter problems installing or running dmake please
  84. #       let me know.  As always, I am always happy to receive e-mail.
  85. # DETAILS OF CHANGES:
  86. # ===================
  87. # MKS Copyright Infringement:
  88. # ---------------------------
  89. #    Due to a misunderstanding over past contractual obligations between
  90. #    myself and Mortice Kern Systems of Waterloo, Ontario, Canada (MKS),
  91. #    the original posting of dmake unitentionally contains some code
  92. #    derived from MKS proprietary code.
  93. #    This version rectifies that situation and MUST replace all versions
  94. #    of DMAKE and DMAKE patches that have been previously distributed.
  95. #    Please delete from any archive site versions of DMAKE source code
  96. #    labeled 3.5 patch level 1 or patch level 2 and dmake 3.5 patch 1.
  97. #    Version 3.6 of the dmake source replaces *ALL* MKS proprietary code.
  98. #    In particular, putenv.c in the bsd43 and sysvr1 directories is new.
  99. #    Three routines in percent.c;  Add_dfa, Construct_dfa, and Advance_dfa
  100. #    have been replaced.  Lastly, TEXT DIVERSION processing has been removed
  101. #    from make.c and <+...+> constructions are replaced by the $(mktmp ...)
  102. #    construct (see below for more details).  The changes relating to the
  103. #    above mentioned modifications have been reviewed by MKS and certified by
  104. #    MKS to be free of MKS proprietary code.  The note below is from MKS
  105. #    and releases dmake version 3.6 patch level 1 from any MKS copyright
  106. #    infringement claims.
  107. #     "MKS has reviewed the latest sources, as of 90.09.20,
  108. #      for the files make.c, putenv.c, and percent.c, which
  109. #      are part of the program dmake version 3.6, and found
  110. #      these files to be free of MKS proprietary source code."
  111. #    No functionality is lost as a result of these changes, however
  112. #    certain constructs may have to be expressed using a new syntax.  See
  113. #    the documentation and the comments below for details.
  114. # Text Diversion Processing:
  115. # --------------------------
  116. #    As alluded to above, the <+...+> text diversion facility has been
  117. #    officially replaced by a new facility of the form $(mktmp ...) details of
  118. #    which may be found in the TEXT DIVERSION section of the documentation.
  119. #    Briefly, the construct:
  120. #         exe:; link @<+$(OBJFILES:t"+\n")+>
  121. #    is replaced by:
  122. #         exe:; link @$(mktmp $(OBJFILES:t"+\n"))
  123. #    similarly the construct:
  124. #         all :
  125. #                 echo hi <+
  126. #                 line1
  127. #                 line2 +>
  128. #    is replaced by:
  129. #         all :
  130. #                 echo hi $(mktmp\
  131. #                 line1\n\
  132. #                 line2)
  133. #    where the \n\ is added to the end of each line within the data portion of
  134. #    the $(mktmp ...) construction.  For a number of reasons it is my belief
  135. #    that this new construct is a better implementation of text diversions than
  136. #    the previous <+...+> as it can be used in macro expressions that appear
  137. #    anywhere in the makefile.
  138. #    Compatibility is retained for previous versions of dmake that utilize
  139. #    a simple form of the <+...+> construct.  If your <+...+> constructs do not
  140. #    span multiple lines (cf second example above), then the new version of
  141. #    dmke will recognize these and will map them to the appropriate
  142. #    $(mktmp ...) construct.  Thus, If you use <+...+> and you do not allow the
  143. #    interior data to span multiple lines and both <+ and +> appear as clear
  144. #    text in the same recipe line or macro value, then dmake will process these
  145. #    correctly and the output is 100% compatible to version 3.5 patch level 2.
  146. #    Any other use of <+...+> must be converted to the new $(mktmp ...) form.
  147. #    The new form also provides for massaging the name of the temporary file
  148. #    which replaces the text in the recipe.  See the documentation regarding
  149. #    the special macros USESHELL, TMPFILE, and DIVSHELL.  This is of most use
  150. #    in an MSDOS environment.
  151. # DOS Swapping, and MKS argument passing:
  152. # ---------------------------------------
  153. #    dmake now supports swapping the executable image to secondary storage when
  154. #    it executes a child.  Swapping is enabled by setting the new attribute
  155. #    .SWAP to on, either for a target or globally, or by specifying the '%'
  156. #    modifier to a recipe line.  So for example:
  157. #     xx .SWAP :; recipe
  158. #    and
  159. #     xx :;% recipe
  160. #    are equivalent.
  161. #    The MKS DOS argument passing conventions are now supported, and dmake is
  162. #    able to communicate with programs that understand those conventions.  The
  163. #    global variable .MKSARGS is used to enable/disable this facility.  With
  164. #    these modifications, dmake now supports long command lines for running
  165. #    commands that understand the MKS argument passing convention, and it does
  166. #    not run into memory limitations when executing child processes in most
  167. #    situations.
  168. #    Both .SWAP and .MKSARGS are ignored by non-MSDOS versions of dmake.
  169. #    See the manual page for further details.
  170. # Other tweaks modifications and BUG FIXES:
  171. # -----------------------------------------
  172. # -- Slight modifications to msdos/startup.mk files.  Set DIRSEPSTR to \
  173. #    if using command.com as the shell, otherwise set internaly to /.
  174. #    Removed -o $@ from MSC startup.mk, and added $(ASFLAGS) to %$O : %$S
  175. #    rule, in all default DOS startup.mk files.
  176. # -- Added POSIX '+' character to start of recipe lines.  You can use this
  177. #    to force the recipe line to be executed by a shell, in addition to the
  178. #    test used for .SHELLMETAS.
  179. #    To make the '+' fit into the dmake mold, a new attribute has been created.
  180. #    the .USESHELL attribute forces the use of a shell for the target or
  181. #    recipe group for which it is specified.  If it is specified as a global
  182. #    attribute then all recipes executed will use a shell.  The macro variable
  183. #    .USESHELL corresponds to the special target '.USESHELL :' in the same way
  184. #    that .IGNORE corresponds to '.IGNORE :'.
  185. # -- Added *= and *:= macro assignmen operator, patches from 
  186. #    Piercarlo Grandi <pcg@compsci.aberystwyth.ac.uk>, see the documentation
  187. #    for more details.
  188. # -- Changed makefile.mk to force use of a shell (via '+') to make OBJDIR,
  189. #    doesn't break on baren DOS systems that way :-).  Many other small changes
  190. #    to msdos and unix versions of various config.mk files.
  191. # -- Added two new macros related to diversion file processing.
  192. #    See the TEXT DIVERSIONS section of the man page for an explanation of this
  193. #    functionality.
  194. #         TMPFILE - is set to the name of the temporary file whenever
  195. #                   a temporary file is opened by dmake.
  196. #         USESHELL- It's value is 'no' if the current recipe line is not forced
  197. #           to use a shell via a '+' or .USESHELL directive.  It's
  198. #           value is 'yes' if such a directive is given.
  199. #     DIVFILE - is defined in startup.mk and gives a macro to use to set
  200. #           name of the diversion file, (under UNIX, DIVFILE defaults to
  201. #           $(TMPFILE), under MSDOS it is the value of $(TMPFILE) with
  202. #           any / replaced by the appropriate number of \ depending, on
  203. #           if a shell is used or not).
  204. # -- \\ appearing at the end of a line does not cause a continuation to the next
  205. #    line.
  206. # -- Modified the definition of macro supplied from the command line to allow
  207. #    macros defined using += or +:= to be modified further from within the
  208. #    makefile.
  209. # -- Added MAKETARGETS macro which contains the name of the target(s), if any,
  210. #    specified on the command line.
  211. # -- Modified Pack_argv in sysintf.c to use dynamic memory allocation rather
  212. #    than limit it to a fixed number of arguments.
  213. # -- BIG BUG FIX:
  214. #    This one is cute.  It turns out that all individual recipe line
  215. #    attributes supplied via '@', '-', and now '+' and '%' characters were
  216. #    getting or'ed together and applied to ALL recipe lines of the recipe, yulk!
  217. # -- BUG FIX:
  218. #    Fixed off by one error in make.c:_print_cmnd when remapping \n after
  219. #    printing the text.
  220. # -- BUG FIX:  Bug reported by holos0!lbr@gatech.edu
  221. #    Inferred prerequisites were not getting made when a target was found to
  222. #    be out of date relative to a non-inferred prerequisite, and the inferred
  223. #    prerequisite did not exist but the file it could be made from did and was
  224. #    not out of date relative to the target.  This was a problem with the
  225. #    following setup.
  226. #         file.o : header.h
  227. #    File system contains file.o, header.h and RCS/file.c,v, If file.o is newer
  228. #    than RCS/file.c,v and older than header.h, then dmake didn't check out
  229. #    file.c prior to doing the compile.
  230. # -- BUG FIX: Applied patch from UUCP: twc@legal or ...sun!ys2!legal!twc
  231. #    to msdos/_chdir.c to fix changing of directory in OS/2 protected mode
  232. # -- BUG FIX: Applied patch from UUCP: twc@legal or ...sun!ys2!legal!twc
  233. #    to msdos/switchar.c to read environment variable SWITCHAR instead of using
  234. #    unsupported call in DOS.  OS/2 doesn't have _get_switchar call!  (It damn
  235. #    well should though!  Microsoft is really dumb in this respect!)
  236. #    Extended this patch to use SWITCHAR environment variable in all DOS
  237. #    versions.  This ensures that DOS 4.0 can selectively change SWITCHAR by
  238. #    using the environment variable.
  239. #    Dmake now first gets SWITCHAR from the environment and if that fails it
  240. #    tries the unsupported MSDOS call.  Under UNIX getswitchar returns '-'
  241. #    as before.
  242. # -- BUG FIX: Changed the line _ar.ar_size = atol(arhdr.ar_size) found in
  243. #    ar_scan() in arlib.c to not use atol() if ASCARCH is FALSE.  I forget who
  244. #    reported this one :-)
  245. # -----------------------------------------------------------------------------
  246. exit 0
  247.  
  248.